<!---

Copyright 2009:

Author: Marco van den Oever
Company: WSO
Website: http://www.webserviceonline.biz
Email: marco@webserviceonline.biz

License: 

This software is licensed under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
For a copy of the GNU General Public License check the license folder or see <http://www.gnu.org/licenses/>.

Description:

wsoFarcryTickets, a Farcry plugin to administer tickets

Build with great support from the Farcry-Dev group! (Google on Farcry-Dev)

Created: 03/02/09

Tested on CF8

--->
<cfsetting enablecfoutputonly="true">
<cfimport taglib="/farcry/core/tags/formtools" prefix="ft" />
<cfimport taglib="/farcry/core/tags/admin/" prefix="admin" />
<!--- set up page header --->
<admin:header title="Knowledge Base" />
<!--- check if the knowledge base categories type is deployed, else show link to deploy --->

<cftry>
  <cfset oFormtoolUtil = createObject("component",
"farcry.core.packages.farcry.formtools") />
  <cfset sqlColumns="objectid" />
  <cfset knbasecats = oFormtoolUtil.getRecordset(sqlColumns=sqlColumns,
sqlWhere="objectid = objectid", typename="knbasecats",
bCheckVersions=true) />
  <cfcatch type="database">
    <cfoutput>The 'Knowledge Base Categories' content type has not been deployed yet. Click <a href="/webtop/admin/customadmin.cfm?module=customlists/knbasecats.cfm&amp;plugin=wsoFarcrytickets&amp;deploy=true">here</a> to deploy it now.</cfoutput>
    <cfabort>
  </cfcatch>
</cftry>
<!--- check if a knowledge base categories item exists, else show link to create --->
<cfquery name="knbasecatscheck" datasource="#application.dsn#">
SELECT objectid FROM #application.dbowner#knbasecats WHERE objectid = objectid
</cfquery>
<cfif isdefined('knbasecatscheck.recordcount') and knbasecatscheck.recordcount le 0>
  <cfoutput>There is no Knowledge Base Categories item created yet. Click <a href="/webtop/admin/customadmin.cfm?module=customlists/knbasecats.cfm&plugin=wsoFarcryTickets">here</a> to create one now.</cfoutput>
  <cfabort>
</cfif>
<ft:objectAdmin
	title="Knowledge Base"
	typename="knbase"
	ColumnList="datetimecreated,datetimelastupdated,knbasecat,subject,solution"
	SortableColumns="datetimecreated,datetimelastupdated,knbasecat,subject,solution"
	lFilterFields=""
	plugin="wsoFarcryTickets"
	sqlorderby="datetimecreated" />
<admin:footer />
<cfsetting enablecfoutputonly="false">
